rm(list=ls())
if(!require(VIM)) install.packages("VIM"); require(VIM)
if(!require(assertthat)) install.packages("assetthat"); require(assertthat)
if(!require(foreign)) install.packages("foreign"); require(foreign)
#setwd("/Users/fsouza/Dropbox/Philips Souza Whitten/PSRM Submission/Missingness Map/")
dta <- read.csv("PSWData_missing.csv")
#dta1 <- read.dta("PSWData.dta")
dta$country <- NULL
#Creating Missingness Map with Philips Souza Whitten Dataset

#missmap(dta, legend = TRUE, main="Missingness Map of PSW Income Share Dataset",
#        rank.order=FALSE, y.labels = NULL, y.at=NULL, xlab='')
#axis(side = 2, lty=0, labels=c("Uruguay", "Canada", "Sweden", "US", "Brazil"), at=c(5, 4, 3, 2, 1), las=2)

pdf("SI_Figure_6.pdf")
matrixplot(dta, interactive = F, col = c("darkred", "blanchedalmond", "white"), axes=FALSE)
axis(side = 2, pos=(0.5), labels=c("Brazil", "US", "Sweden", "Canada"), at=c(4, 3, 2, 1), las=2)
abline(a = NULL, b = NULL, h = NULL, v = 1.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 2.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 3.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 4.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 5.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 6.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 7.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 8.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 9.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 10.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 11.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 12.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 13.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 14.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 15.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 16.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 17.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 18.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 19.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 20.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 21.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 22.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 23.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 24.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 25.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 26.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 27.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 28.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 29.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 30.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 31.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 32.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 33.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 34.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 35.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 36.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 37.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 38.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 39.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 40.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 41.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 42.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 43.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 44.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 45.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 46.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 47.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 48.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 49.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 50.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 51.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 52.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 53.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 54.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 55.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 56.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 57.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 58.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 59.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 60.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 61.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 62.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 63.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 64.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 65.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 66.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 67.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 68.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 69.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 1.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 2.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 3.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 4.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
leg.txt <- c("Missing", "Observed")
par(xpd=TRUE)
axis(side = 1, labels=c("1948", "1952", "1956", "1960", "1964", "1968", "1972", "1976", 
                        "1980", "1984", "1988", "1992", "1996", "2000", "2004", "2008", 
                        "2012", "2016"), at=c(2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50,
                                              54, 58, 62, 66, 70), las=2)
legend(44, 4.85, legend=leg.txt, horiz=TRUE, col = c("blanchedalmond",
      "darkred"), pch=c(15, 15), adj = c(0, 0.6), cex=0.9, pt.cex=2.2, bty="n")
dev.off()
#title(main = "PSW Missing vs. Observed Income Share Data", sub = NULL, xlab = NULL, ylab = NULL,
 #     line = NA, outer = FALSE)


#LIS Data Now...
rm(list=ls())
if(!require(foreign)) install.packages("foreign"); require(foreign)
if(!require(assertthat)) install.packages("assertthat"); require(assertthat)
if(!require(Amelia)) install.packages("Amelia"); require(Amelia)
if(!require(VIM)) install.packages("VIM"); require(VIM)
setwd("/Users/fsouza/Dropbox/Philips Souza Whitten/PSRM Submission/Missingness Map/")
dta2 <- read.csv("LISData_missing.csv")
dta2$country <- NULL
pdf("SI_Figure_5.pdf")
matrixplot(dta2, interactive = F, col = c("darkred", "blanchedalmond", "white"), axes=FALSE)

abline(a = NULL, b = NULL, h = NULL, v = 1.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 2.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 3.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 4.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 5.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 6.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 7.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 8.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 9.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 10.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 11.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 12.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 13.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 14.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 15.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 16.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 17.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 18.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 19.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 20.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 21.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 22.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 23.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 24.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 25.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 26.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 27.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 28.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 29.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 30.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 31.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 32.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 33.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 34.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 35.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 36.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 37.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 38.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 39.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 40.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 41.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 42.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 43.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 44.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 45.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 46.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 47.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 48.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 49.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 50.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 51.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 52.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 53.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 54.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 55.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 56.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 57.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 58.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 59.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 60.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 61.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 62.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 63.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 64.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 65.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 66.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 67.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 68.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = NULL, v = 69.5, reg = NULL,
       coef = NULL, untf = FALSE, col="white")

abline(a = NULL, b = NULL, h = 1.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 2.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 3.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 4.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 5.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 6.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 7.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 8.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 9.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 10.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 11.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 12.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 13.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 14.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 15.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 16.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 17.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 18.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 19.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 20.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 21.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 22.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 23.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 24.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 25.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 26.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 27.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 28.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 29.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 30.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 31.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 32.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 33.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 34.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 35.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 36.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 37.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 38.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 39.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 40.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 41.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 42.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 43.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 44.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 45.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 46.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")
abline(a = NULL, b = NULL, h = 47.5, v = NULL, reg = NULL,
       coef = NULL, untf = FALSE, col="white")

axis(side = 1, labels=c("1948", "1952", "1956", "1960", "1964", "1968", 
                        "1972", "1976", "1980","1984", "1988", "1992", 
                        "1996", "2000", "2004","2008", "2012", "2016"), 
     at=c(2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50,
          54, 58, 62, 66, 70), las=2)

axis(side = 2, pos=(0.5), cex.axis=0.65,
     labels=c("Australia", "Austria", "Belgium", "Brazil", "Canada", "China",
              "Colombia", "Czech R.", "Denmark", "Dominican R.", "Egypt", "Estonia",
              "Finland", "France", "Georgia", "Germany", "Greece", "Guatemala", "Hungary",
              "Iceland", "India", "Ireland", "Israel", "Italy", "Japan", "Lithuania",
              "Lucembourg", "Mexico", "Netherlands", "Norway", "Panama", "Paraguay",
              "Peru", "Poland", "Romania", "Russia", "Serbia", "Slovakia", "Slovenia",
              "S. Africa", "S. Korea", "Spain", "Sweden", "Switzerland", "Taiwan",
              "UK", "US", "Uruguay"), 
     at=c(48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30,
          29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11,
          10, 9, 8, 7, 6, 5, 4, 3, 2, 1), las=2)

leg.txt <- c("Missing", "Observed")
legend(44, 52.95, legend=leg.txt, horiz=TRUE, col = c("blanchedalmond",
                                                     "darkred"), pch=c(15, 15), adj = c(0, 0.6), cex=0.9, pt.cex=2.2, bty="n")
dev.off()
#title(main = "LIS Missing vs. Observed Income Data", sub = NULL, xlab = NULL, ylab = NULL,
 #     line = NA, outer = FALSE)
